package sns.service;

import java.util.List;
import org.springframework.transaction.annotation.Transactional;
import sns.bean.Comment;
import sns.bean.Mblog;
import sns.dao.CommentDao;

@Transactional
public class CommentService {

	private CommentDao commentDao;
	
	/**
	 * get comment by its id
	 * 
	 * @param idcomment
	 * @return
	 */
	public Comment getCommentById(Long idcomment){
		return commentDao.getCommentById(idcomment);
	}
	
	/**
	 * get comments of the mblog
	 * 
	 * @param mblog
	 * @return
	 */
	public List<Comment> getCommentOfMblog(Mblog mblog){
		return commentDao.getCommentOfMblog(mblog);
	}

	public void setCommentDao(CommentDao commentDao) {
		this.commentDao = commentDao;
	}
}
